import * as MUTATIONS_TYPE from './mutations_type';

const actions = {
  updateMocksStatus ( {commit}, mocksStatus) {
    commit(MUTATIONS_TYPE.UPDATE_MOCKS_STATUS, mocksStatus);
  },
  updateCurrentPart ({commit}, currentPart) {
    commit(MUTATIONS_TYPE.UPDATE_CURRENT_PART, currentPart);
  },
  updateTotalPart ({commit}, totalPart) {
    commit(MUTATIONS_TYPE.UPDATE_TOTAL_PART, totalPart);
  },
  updatePaperId ({commit}, paperId) {
    commit(MUTATIONS_TYPE.UPDATE_PAPER_ID, paperId);
  },
  updatePaperType ({commit}, paperType) {
    commit(MUTATIONS_TYPE.UPDATE_PAPER_TYPE, paperType);
  },
  updateCourseId ({commit}, courseId) {
    commit(MUTATIONS_TYPE.UPDATE_COURSE_ID, courseId);
  },
  updatePaperInfo ({commit}, paperInfo) {
    commit(MUTATIONS_TYPE.UPDATE_PAPER_INFO, paperInfo);
  },
  updateDisabledPrevBtn ({commit}, disabledPrevBtn) {
    commit(MUTATIONS_TYPE.UPDATE_DISABLE_PREV_BTN, disabledPrevBtn);
  },
  updateDisabledNextBtn ({commit}, disableNextBtn) {
    commit(MUTATIONS_TYPE.UPDATE_DISABLE_NEXT_BTN, disableNextBtn);
  },
  updateIsAllowReocrd({commit}, isAllowRecord) {
    commit(MUTATIONS_TYPE.UPDATE_IS_ALLOW_RECORD, isAllowRecord);
  },
  updateQuestionNum ({commit}, questionNum) {
    commit(MUTATIONS_TYPE.UPDATE_QUESTION_NUM, questionNum);
  },
  updateMp3Recorder ({commit}, mp3Reacorder) {
    commit(MUTATIONS_TYPE.UPDATE_MP3RECODER, mp3Reacorder);
  },
  updateShowHeaderPart ( {commit}, showHeaderPart) {
    commit(MUTATIONS_TYPE.UPDATE_SHOW_HEADER_PART, showHeaderPart);
  }
}

export default actions;
